#include "string.h"
#include "pthread.h"
#include "sched.h"
#include "map.h"
#include <ctype.h>

#include "HyperTextTransfer.h"
#include "IniDictionary.h"
#include "IniParser.h"

typedef struct _CommandRunner_ {
	UrlStruct		UrlFileInfo ;
	IniParser *		iniparse ;
	IniDictionary *		inidict ;
	dictionary *		ini ;
	char			softwarename[256] ;
	char *                  path;
} CommandRunner;

typedef struct _Configurations_ {
	int     Threads ;
	bool    Enabled ;
	char *  Hostname ;
	int     MaxRate ;
	char *  Broadcast ;
	double  MinRate ;
} Configurations;

enum CommandValues {
	evCommandNotDefined,
	evCommandValue01,
	evCommandValue02,
        evCommandValue03,
        evCommandValue04,
        evCommandValue05,
        evCommandEnd
};

std::map<std::string, CommandValues> MappedCommandValues;

class ServicesBuilder
{
	public:

                Configurations *        config;

                ServicesBuilder();
		~ServicesBuilder();

		int RunConfiguration(char * ini_name, int pCount);
		bool RunCommand(char * cmd_ini_name, CommandRunner * cmdstruct);

};
